//用户资源分类Api
import {get, post, put, del} from "../utils/request";

// 获取所有资源分类
export function listAllCate() {
    return get('/resource/category/list');
}

// 删除资源分类
export function deleteResourceCategory(id) {
    return del('/resource/category/del/' + id);
}

// 更新资源分类
export function updateResourceCategory(info) {
    const data = {
        "createTime": info.createTime,
        "id": info.id,
        "name": info.name,
        "sort": info.sort
    }
    return post('/resource/category/update/' + info.id, data)
}

// 新增资源分类
export function createResourceCategory(info) {
    const data = {
        "createTime": info.createTime,
        "id": info.id,
        "name": info.name,
        "sort": info.sort
    }
    return post('/resource/category/insert', data)
}